package com.itany.cloud.service.impl;

import com.itany.cloud.service.UserService;
import com.itany.cloud.util.ResponseResult;
import org.springframework.stereotype.Service;

/**
 * @author 石小俊
 */
@Service
public class UserServiceFallback implements UserService {
    @Override
    public ResponseResult findAll() {
        return ResponseResult.success("cloud-nacos-provider服务出现了问题,通过Sentinel进行熔断");
    }

    @Override
    public ResponseResult findById(Integer id) {
        return ResponseResult.success("cloud-nacos-provider服务出现了问题,通过Sentinel进行熔断");
    }

    @Override
    public ResponseResult addUser(String username, String password) {
        return ResponseResult.success("cloud-nacos-provider服务出现了问题,通过Sentinel进行熔断");
    }

    @Override
    public ResponseResult modifyUser(Integer id, String username, String password) {
        return ResponseResult.success("cloud-nacos-provider服务出现了问题,通过Sentinel进行熔断");
    }

    @Override
    public ResponseResult deleteUser(Integer id) {
        return ResponseResult.success("cloud-nacos-provider服务出现了问题,通过Sentinel进行熔断");
    }
}
